Skip to content

Instantly share code, notes, and snippets.

@liuzhoou
liuzhoou / init.lua
Created October 9, 2025 08:45
层叠当前窗口
-- ~/.hammerspoon/init.lua
------------------------------------------------------------
-- 仅层叠:当前聚焦窗口 → 所在显示器 + 该窗口所在 Space
-- 热键:Ctrl + Option + Command + C
------------------------------------------------------------
local hasSpaces = (hs.spaces ~= nil)
-- 层叠参数(按需改)
local CASCADE_CFG = {
# 2025年10月30日
# port: 7890 # HTTP(S) 代理服务器端口
# socks-port: 7891 # SOCKS5 代理端口
mixed-port: 10801 # HTTP(S) 和 SOCKS 代理混合端口
redir-port: 7891 # 透明代理端口,用于 Linux 和 MacOS
# Transparent proxy server port for Linux (TProxy TCP and TProxy UDP)
tproxy-port: 1536
@steven-schmoll-at
steven-schmoll-at / snake-to-camel-transform.ts
Created September 21, 2021 04:03
A typescript utility type to convert snake_case keys of an interface, to camelCase
/**
* Converts a type string from a snake_case string to PascalCase.
* This will convert all snake case strings including strings with no underscores, or many
*/
export type PascaleFromSnake<String extends string> = String extends `${infer First}_${infer Rest}` ? `${Capitalize<Lowercase<First>>}${PascaleFromSnake<Rest>}` : Capitalize<Lowercase<String>>
/**
* Converts a type string from a snake_case string to camelCase.
* This will convert all snake case strings including strings with no underscores, or many
*/
@robconery
robconery / markdown.code-snippets
Last active December 18, 2025 01:38
Code style Snippets
//drop this file into your .vscode directory for local snippets
{
"JS Styles": {
"scope": "markdown",
"prefix": "style-js",
"body": [
"# Javascript",
"",
"This project uses JavaScript with the following styles:",
"",
@amunchet
amunchet / noVNCCopyPasteProxmox.user.js
Last active December 18, 2025 01:32
Copy/Paste for noVNC Proxmox
// ==UserScript==
// @name noVNC Paste for Proxmox
// @namespace http://tampermonkey.net/
// @version 0.2a
// @description Pastes text into a noVNC window (for use with Proxmox specifically)
// @author Chester Enright
// @match https://*
// @include /^.*novnc.*/
// @require http://code.jquery.com/jquery-3.3.1.min.js
// @grant none
@SMUsamaShah
SMUsamaShah / list_of_p2p_file_sharing.md
Last active December 18, 2025 01:30
List of P2P file sharing tools

Browser Based

  1. Web Wormhole https://webwormhole.io/ https://github.com/saljam/webwormhole
  2. Localsend https://web.localsend.org/
  3. FilePizza https://file.pizza/
  4. ShareDrop sharedrop.io https://github.com/szimek/sharedrop (SOLD, not recommended, use one of the forks)
    1. A clone SnapDrop snapdrop.net https://github.com/RobinLinus/snapdrop (SOLD, not recommended, use one of the forks)
      1. A fork PairDrop https://pairdrop.net/ https://github.com/schlagmichdoch/pairdrop
  5. ToffeeShare https://toffeeshare.com/
  6. Instant.io https://instant.io/
@OrionUnix
OrionUnix / Sublime Text 3.2.2 Build 3211 key licence
Last active December 18, 2025 01:30
Sublime Text 3.2.2 Build 3211 key licence
----- BEGIN LICENSE -----
Member J2TeaM
Single User License
EA7E-1011316
D7DA350E 1B8B0760 972F8B60 F3E64036
B9B4E234 F356F38F 0AD1E3B7 0E9C5FAD
FA0A2ABE 25F65BD8 D51458E5 3923CE80
87428428 79079A01 AA69F319 A1AF29A4
A684C2DC 0B1583D4 19CBD290 217618CD
@yamamaya
yamamaya / SortingNetwork.c
Last active December 18, 2025 01:28
Sorting network for 9 elements
#define SWAP(a, b) if (arr[a] > arr[b]) { uint8_t tmp = arr[a]; arr[a] = arr[b]; arr[b] = tmp; }
// Sorting network for 9 elements (25 steps)
void SortingNetwork9(uint8_t *arr) {
SWAP(0, 1);
SWAP(3, 4);
SWAP(6, 7);
SWAP(1, 2);
SWAP(4, 5);
SWAP(7, 8);